home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / uw_1.exe / UW_PROTO.H < prev    next >
Text File  |  1992-10-25  |  14KB  |  347 lines

  1. /****************************************************************************/
  2. /*                                                                                                                                                    */
  3. /* UW_PROTO.H                                                                                                                             */
  4. /*                                                                                                                                                    */
  5. /* Prototype file for UltraWin.                                             */
  6. /*                                                                                                                    Kevin Huck            */
  7. /*                                                                                                                    Boyd Gafford        */
  8. /*                                                                                                                                                    */
  9. /****************************************************************************/
  10. #ifndef __UW_PROTO_H
  11. #define __UW_PROTO_H
  12.  
  13. /*------------------------- Prototypes for UW_MGR.C ------------------------*/
  14. void reset_all_masks( void );
  15. void refresh_desktop( void );
  16. void refresh_column( int col );
  17. void refresh_row( int row );
  18. void redisplay_rect( RECT *rectp );
  19. void add_wn_mask( WINDOW *wnp );
  20. void remove_wn_mask( WINDOW *wnp );
  21. void col_wn_mask( int x_pos, int y_min, int y_max, int amount );
  22. void row_wn_mask( int y_pos, int x_min, int x_max, int amount );
  23. void set_window_attr( void );
  24. WINDOW *end_window( WINDOW *wnp );
  25. WINDOW *cr_inwindow( int col, int row );
  26. WINDOW *link_window( WINDOW *wnp );
  27. int unlink_window( WINDOW *wnp );
  28. int remove_window_ll( int destroy_mode, WINDOW *wnp );
  29. void pull_to_top( WINDOW *wnp );
  30. int make_top_window( WINDOW *wnp );
  31. void move_wn_left( int cols, WINDOW *wnp );
  32. void move_wn_right( int cols, WINDOW *wnp );
  33. void move_wn_up( int rows, WINDOW *wnp );
  34. void move_wn_down( int rows, WINDOW *wnp );
  35. void set_rect(RECT *rectp, int x1, int y1, int x2, int y2);
  36. int is_rect_equal( RECT *r1, RECT *r2 );
  37. int rect_enclosed(RECT *r1, RECT *r2);
  38. int rect_overlap(RECT *r1, RECT *r2);
  39. void offset_rect(RECT *rectp, int col, int row);
  40. int col_row_inrect(int col, int row, RECT *rectp);
  41.  
  42. /*------------------------- Prototypes for UW_FONT.C ------------------------*/
  43. int encode_color(int r, int g, int b);
  44. void decode_color(int color, int *r, int *g, int *b);
  45. void write_palette( int pnum, uchar val );
  46. void write_palette_all( uchar *vals );
  47. int read_palette( int pnum );
  48. void read_palette_all( uchar *vals );
  49. void set_block_ab(int a, int b);
  50. void blink_enable(int state);
  51. void replicate_enable(int state);
  52. int load_font( uchar *font, char *fname );
  53. int save_font( uchar *font, char *fname, int scan_lines );
  54. void rom8x8(int block, int setmode);
  55. void rom8x14(int block, int setmode);
  56. void rom8x16(int block, int setmode);
  57.  
  58. /*------------------------- Prototypes for UW_ENTRY.C ------------------------*/
  59. void up_first_char( char *wk_str, char *mask, int mode );
  60. void disp_entry( int c, int r, uchar m_att, char *s, char *m,
  61.                                  int offset, int disp_width, int arrow_flag, WINDOW *wnp );
  62. void g_insert( char *s, char *m, char *t, int pos );
  63. void g_delete( char *s, char *m, char *t, int pos );
  64. void g_rtl_insert( char *s, char *m, char *t, int pos );
  65. void g_rtl_delete( char *s, char *m, char *t, int pos );
  66. void add_mask( char *s, char *m, char *t );
  67. int rmv_mask( char *s, char *t );
  68. int validate( char *c, char t );
  69. void strip_entry( char *s, char *m );
  70. void strip_end( char *s, char *m );
  71. void strip_start( char *s, char *m );
  72. int strip_len( char *s, char *m );
  73. int wn_gets( char *str, char *mask, char *tplt, uchar m_att,
  74.                          int strip_mode, WINDOW *wnp );
  75. int init_gets_str( char *s, char *m, char *t, char *wk );
  76. void rev_init_gets_str( char *s, char *m, char *t, char *wk );
  77. void reverse_str( char *s );
  78. int wn_gets_ll( char *str, char *mask, char *tplt, uchar m_att,
  79.                                 int flags, int disp_width, WINDOW *wnp );
  80. void set_validation_func( int (*func_ptr)(char*, char*, char*, 
  81.                                                     int, int, WINDOW*) );
  82. void set_gets_hook( int (*func_ptr)(char*, char*, char*, int, int, 
  83.                                         int, EVENT*, WINDOW*) );
  84.  
  85. /*------------------------- Prototypes for UW_MENU.C ------------------------*/
  86. void menu_st( MENU *mnp, int csr, int inx);
  87. int menu_create( int x_min, int y_min, int x_max, int y_max, int direction,
  88.                            uchar back_att, uchar bdr_att, uchar csr_att, uchar first_att,
  89.                              int bdr, int type, MENU *mnp );
  90. int item_add( char *entry, int id, int first_pos, MENU *mnp );
  91. void menu_set( MENU *mnp );
  92. void menu_restore( MENU *mnp );
  93. void menu_destroy( MENU *mnp );
  94. void decrement_csr( int *csr, int min, int max);
  95. void increment_csr( int *csr, int min, int max);
  96. int upkey( int key );
  97. int menu_horiz( MENU *mnp, int proc_mode );
  98. int menu_vert( MENU *mnp, int proc_mode );
  99. int do_menu( MENU *mnp, int proc_mode );
  100. int menu_system( MENU *top_mnp, MENU *dropmenu[], int draw_top );
  101. int menu_system_ll( MENU *top_mnp, MENU *dropmenu[], int draw_top,
  102.                                       int first_key, int exit_mode );
  103.  
  104. /*------------------------- Prototypes for UW_PRTF.C ------------------------*/
  105. int wn_printf( WINDOW *wnp, char *fmt, ... );
  106.  
  107. /*------------------------- Prototypes for UW_RFSH.C ------------------------*/
  108. void move_n_to_f( int *s, int dest_seg, int dest_off, int cnt );
  109. void move_f_to_n( int src_seg, int src_off, int *d, int cnt );
  110. void wn_io( int dir, int area, WINDOW *wnp );
  111. void wn_rfsh_line( int line, WINDOW *wnp );
  112. void wn_rfsh_col( int col, WINDOW *wnp );
  113.  
  114. /*------------------------- Prototypes for UW_WN.C  ------------------------*/
  115. int wn_create( int x_min, int y_min, int x_max, int y_max, int bdr, int mode, WINDOW *wnp );
  116. void wn_destroy( WINDOW *wnp );
  117. void wn_set( WINDOW *wnp );
  118. void wn_clear( WINDOW *wnp );
  119. void wn_move( int col, int row, WINDOW *wnp );
  120. int wn_size( int x_min, int y_min, int x_max, int y_max, WINDOW *wnp );
  121.  
  122. /*------------------------- Prototypes for UW_LL.C  ------------------------*/
  123. int _csr_adj( WINDOW *wnp );
  124. void _wn_scroll( int dir, WINDOW *wnp );
  125. uchar far *_calc_scr_addr(WINDOW *wnp);
  126. uchar *_calc_buff_addr(WINDOW *wnp);
  127. uchar *_calc_mask_addr(WINDOW *wnp);
  128. void _calc_all_addr(uchar far **scr, uchar **buff, uchar **mask, WINDOW *wnp);
  129. void _fill_rect( uchar att, int v, RECT *rp );
  130.  
  131. /*------------------------- Prototypes for UW_BDR.C ------------------------*/
  132. void wn_co( int cnt, uchar c, WINDOW *wnp );
  133. void wn_border( WINDOW *wnp );
  134. void wn_hline(int row, int style, WINDOW *wnp);
  135. void wn_vline(int col, int style, WINDOW *wnp);
  136.  
  137. /*------------------------- Prototypes for UW_MASK.C ------------------------*/
  138. void adjust_mask_col( int x_pos, int y_min, int y_max, int amount, WINDOW *wnp );
  139. void adjust_mask_row( int y_pos, int x_min, int x_max, int amount, WINDOW *wnp );
  140. void set_mask( int mode, WINDOW *wnp1, WINDOW *wnp2 );
  141. void clear_mask( WINDOW *wnp );
  142.  
  143. /*------------------------- Prototypes for UW_TERM.C ------------------------*/
  144. void wn_claol( WINDOW *wnp );
  145. void wn_cleol( WINDOW *wnp );
  146. void wn_clbol( WINDOW *wnp );
  147. void wn_cleos( WINDOW *wnp );
  148. void wn_clbos( WINDOW *wnp );
  149. void wn_claos( WINDOW *wnp );
  150. void wn_cln(int qty, WINDOW *wnp);
  151. void wn_clear_tabs( WINDOW *wnp );
  152. void wn_init_tabs( int space, WINDOW *wnp );
  153. void wn_set_tab( WINDOW *wnp );
  154. void wn_reset_tab( WINDOW *wnp );
  155. void wn_tab_right( int cnt, WINDOW *wnp );
  156. void wn_tab_left( int cnt, WINDOW *wnp );
  157. void wn_ins_del_chars(int mode, char c, int cnt, WINDOW *wnp );
  158. void wn_ins_del_lines(int mode, char c, int cnt, WINDOW *wnp );
  159. void wn_csr_dn( int qty, WINDOW *wnp );
  160. void wn_csr_up( int qty, WINDOW *wnp );
  161. void wn_csr_left( int qty, WINDOW *wnp );
  162. void wn_csr_right( int qty, WINDOW *wnp );
  163. void wn_csr_pos( int line, int col, WINDOW *wnp );
  164. void wn_scroll_reg( int line_s, int line_e, WINDOW *wnp );
  165. void wn_bksp( int qty, WINDOW *wnp );
  166.  
  167. /*------------------------- Prototypes for UW_GRAPH.C ------------------------*/
  168. int init_uw_graphics( int xres, int yres, int font_rows, int font_spacing,
  169.                                             int seg, int off );
  170. int g_ch( int c, int r, uchar v );
  171. void install_font(uchar *font, int block, int ofs, int cnt,
  172.                                     int scan_lines, int setmode );
  173. uchar far *get_font_info( int typ, int *scan_lines, int *rows );
  174.  
  175. /*------------------------- Prototypes for UW_ST.C  ------------------------*/
  176. void wn_st( char *s, WINDOW *wnp );
  177. void wn_st_qty( char *s, int qty, WINDOW *wnp );
  178. void wn_plst( int col, int line, char *s, WINDOW *wnp );
  179. void wn_st_fmt( char *s, WIN